package zzzhc.image.model;

import java.awt.image.BufferedImage;
import java.util.HashMap;
import java.util.Map;

public class OpTableModel extends NormalTableModel {

	private static final long serialVersionUID = -2550799314006817641L;

	private static String[] COLUMNS = { "分割结果", "转换结果", "对应字符", "分割大小",
			"神经网络输入" };

	public OpTableModel() {
		init(COLUMNS, new Class[] { BufferedImage.class, BufferedImage.class,
				String.class, String.class, String.class }, new Boolean[] {
				false, false, true, false, true });
	}

	public void addColumn(BufferedImage image1, BufferedImage image2,
			String code, String wh, String nnString) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put(COLUMNS[0], image1);
		map.put(COLUMNS[1], image2);
		map.put(COLUMNS[2], code);
		map.put(COLUMNS[3], wh);
		map.put(COLUMNS[4], nnString);
		addRow(map);
	}

}
